<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'edititem.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<form enctype="multipart/form-data" action="ITEM/EDIT/${item.id}/PUT" method="post">
  		<table>
  			<tr>
  				<td><label>Name:</label></td>
  				<td><input type="text" name="name" value="${item.name}"/></td>
  			</tr>
  			<tr>
  				<td><label>Price:</label></td>
  				<td><input type="text" name="price" value="${item.price}"/></td>
  			</tr>
  			<tr>
  				<td><label>CreateTime:</label></td>
  				<td><input type="datetime" name="createtime" value='<fmt:formatDate value="${item.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/>'/></td>
  			</tr>
  			<tr>
  				<td><label>Detail:</label></td>
  				<td><input type="text" name="detail" value="${item.detail}"/></td>
  			</tr>
  			<tr>
  				<td><label>Picture:</label></td>
  				<td><input type="file" name="itemPic"/></td>
  			</tr>
  			<tr>
  				<td><input type="submit" value="提交修改"/></td>
  			</tr>
  		</table>
  	</form>
  </body>
</html>
